home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / GAME / Xconq 7.0.1.sit / Xconq 7.0.1 / lib / stdterr.g < prev    next >
Text File  |  1995-08-22  |  3KB  |  98 lines

  1. (game-module "stdterr"
  2. ;;; A standard set of terrain types shared by many game designs.
  3. )
  4.  
  5. (terrain-type sea
  6.   (color "sky blue") (image-name "sea") (char ".")
  7.   (help "deep ocean"))
  8. (terrain-type shallows
  9.   (color "cyan") (image-name "shallows") (char ",")
  10.   (help "coastal waters and lakes"))
  11. (terrain-type swamp
  12.   (color "yellow green") (image-name "swamp") (char "=")
  13.   )
  14. (terrain-type desert
  15.   (color "yellow") (image-name "desert") (char "~")
  16.   )
  17. (terrain-type plains
  18.   (color "green") (image-name "plains") (char "+")
  19.   )
  20. (terrain-type forest
  21.   (color "forest green") (image-name "forest") (char "%")
  22.   )
  23. (terrain-type mountains
  24.   (color "sienna") (image-name "mountains") (char "^")
  25.   )
  26. (terrain-type ice
  27.   (color "white") (image-name "ice") (char "_")
  28.   (help "permanent ice fields"))
  29.  
  30. (define land-t* (desert plains forest mountains))
  31.  
  32. (define cell-t* (sea shallows swamp desert plains forest mountains ice))
  33.  
  34. (terrain-type road
  35.   (color "gray") (char ">")
  36.   (subtype connection) (subtype-x road-x))
  37.  
  38. (terrain-type river
  39.   (color "blue") (char "<")
  40.   (subtype border) (subtype-x river-x))
  41.  
  42. (add t* elevation-min -100)
  43. (add t* elevation-max 2000)
  44. (add (sea shallows swamp) elevation-min 0)
  45. (add (sea shallows swamp) elevation-max (0 0 10))
  46. (add (mountains ice) elevation-min 2000)
  47. (add (mountains ice) elevation-max 9000)
  48.  
  49. ;; The elevations above are consistent with 100-km-across cells. */
  50.  
  51. (area (cell-width 100000))
  52.  
  53. ;; (Ice isn't really a liquid, but this keeps rivers out of icefields.)
  54.  
  55. (add (sea shallows ice) liquid true)
  56.  
  57. ;;; Some defns for the fractal percentile generator.
  58.  
  59. (set alt-blob-density 10000)
  60. (set alt-blob-height 500)
  61. (set alt-blob-size 200)
  62. (set alt-smoothing 4)
  63. (set wet-blob-density 2000)
  64. (set wet-blob-size 100)
  65.  
  66. (add cell-t* alt-percentile-min (  0  68  69  70  70  70  93  99))
  67. (add cell-t* alt-percentile-max ( 68  69  71  93  93  93  99 100))
  68. (add cell-t* wet-percentile-min (  0   0  50   0  20  80   0   0))
  69. (add cell-t* wet-percentile-max (100 100 100  20  80 100 100 100))
  70.  
  71. ;;; River generation.
  72.  
  73. ;; Rivers are most likely to start in the mountains or forests.
  74.  
  75. (add (plains forest mountains ice) river-chance (20.00 30.00 30.00 100.00))
  76.  
  77. ;; Rivers empty into lakes if they don't reach the sea.
  78.  
  79. (set river-sink-terrain shallows)
  80.  
  81. ;;; Road generation.
  82.  
  83. (table road-into-chance
  84.   (land-t* land-t* 100)
  85.   ;; No roads across ice fields.
  86.   (land-t* ice 0)
  87.   ;; Try to get a road back out into the plains.
  88.   (cell-t* plains 100)
  89.   ;; Be reluctant to run through hostile terrain.
  90.   (plains (desert forest mountains) (40 30 20))
  91.   )
  92.  
  93. (set edge-terrain ice)
  94.  
  95. ;;; Any attempts to use t* in other games should be aware of
  96. ;;; how many types are defined in this file.
  97.  
  98.